<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{if isset($SEO['title']) && !empty($SEO['title'])}{$SEO['title']}{/if}{$SEO['site_title']}</title>
<meta name="keywords" content="{$SEO['keyword']}">
<meta name="description" content="{$SEO['description']}">
<link href="{THEME_STYLE_PATH}style/css/default_new.css" type="text/css" rel="stylesheet" />
<script src="{THEME_STYLE_PATH}style/js/jquery.js"></script>
<script src="{THEME_STYLE_PATH}style/js/core.js"></script>
<link href="{THEME_STYLE_PATH}style/css/gamety.css" type="text/css" rel="stylesheet" />
<!--[if IE 6]>
<script src="/js/DD_belatedPNG.js"></script>
<script>
  DD_belatedPNG.fix('*');
</script>
<![endif]-->
<!--[if IE 6]>
<style type="text/css">
    html{overflow:hidden;}
    body{height:100%;overflow:auto;}
</style>
<![endif]-->
</head>

<body>
	<div style=" background:url({THEME_STYLE_PATH}/style/images/bgr.gif)"></div>
	{include template('header','common')}
	<div id="Mainbox">
		<!--插入侧边栏-->
	{include template('sidebar_login','common')}
		<!--插入侧边栏-->
		{include template('top_advance','common')}
		<!--左侧-->
		<div class="Inside_left">
		<!--幻灯-->
	        {include template('advert','common')}

			<!--幻灯-->
						<!--试玩平台-->
			<div class="Tycontent">
				<!--选项卡-->
				<div class="Tyc_opt">
				<a href="{U('Document/Index/lists',array('catid'=>2))}" class="tyc_opt_un">全部试玩</a>
				<a href="{U('Document/Index/lists',array('catid'=>2,'test_type'=>0))}" class="tyc_opt_un">专区试玩</a>
				<a href="{U('Document/Index/lists',array('catid'=>13))}" class="tyc_opt_un">体验赚钱</a>
				<a href="{U('Document/Index/lists',array('catid'=>15))}" class="tyc_opt_on">商家问答</a></div>
				<!--选项卡-->
				<ul class="idx_tyad" style=" margin-bottom:20px;">
				{pc:document action="lists" catid="$catid" order="listorder DESC" }
				{php $count = count($data);}
				{loop $data $r}
					<li{if $n == $count} class="last"{/if}>
						<p><a href="javascript:void(0);" onclick="hitAsk({$r[id]})" class="ityimg"><img src="{$r[thumb]}" class="ityimg"></a></p>
						<p class="a1"><a href="javascript:void(0);" onclick="hitAsk({$r[id]})" {title_style($r[style])}>{$r[title]}</a>&nbsp;&nbsp;
						{if check_answer_status($r['id'])}
						<span class="g46">(可答)</span>
						{else}
						<span class="red">(已答)</span>
						{/if}
						</p>
						<p class="a2">每人奖励：<span class="ofe">{$r[single_reward]}</span><img src="{THEME_STYLE_PATH}style/images/ub.gif" class="ub21"></p>
					</li>
				{/loop}
				{/pc}
				</ul>
			</div>
			<!--试玩平台-->
		</div>
		<!--左侧-->
		<!--右侧-->
		<div class="Inside_right">
			<!--体验步骤-->
			<div class="tystep"><img src="{THEME_STYLE_PATH}style/images/tystep.gif" /></div>
				<!--体验步骤-->
					<!--大家都在玩-->
			<div class="Main_Right">
				<p class="title">大家都在玩</p>
				<ul class="idx_dzw" id="jxy_ul_gameing" style="height:250px;overflow:hidden;">
				<!--40条-->
					<li>
						<p><img src="{THEME_STYLE_PATH}style/images/12.jpg" class="dzw_head" width="50"></p>
						<p class="a1"><span class="g46">congreat</span></p>
						<p class="a2">玩：<a href="#/hitsJump.php?adID=1891" target="_blank" class="b40link">卧龙13服</a><br>领取了<span class="ofe">5,000</span><img src="{THEME_STYLE_PATH}style/images/ub.gif" class="ub17"></p>
					</li>					
				</ul>
			</div>
	
			<script type="text/javascript">
				var scrollup_reward = new VerticalScroll("jxy_ul_gameing");
			    scrollup_reward.LineHeight = 0;
			    scrollup_reward.Amount = 1;
			    scrollup_reward.Delay = 50;
			    scrollup_reward.Timeout = 1000;
			    scrollup_reward.AutoScroll();
			</script>
			<!--大家都在玩-->
			<!-- <div class="Main_Right">230*60</div> -->
			<!--客服中心-->
			<div class="Main_Right">
				<p class="title" style="margin-bottom:10px;">客服中心<label style="float:right;font-size:12px;font-weight: normal;"><a href="{U('Document/Index/lists',array('catid'=>30))}" class="da3" target="_blank">更多</a></label></p>
				<ul class="faqlist">
				{pc:document action="lists" catid="30" num="8"}
				{loop $data $c}
					<li><strong>{$n}.&nbsp;</strong><a href="{$c[url]}">{$c[title]}</a></li>
				{/loop}
				{/pc}
				</ul>
	
			</div>
	<!--客服中心-->
		</div>	

		<script type="text/javascript"></script>

		<!--右侧-->
		<div class="clear"></div>
	</div>
	<!--主体-->
{include template('footer','common')}
<script type="text/javascript">
$(document).ready(function() {
	});
var arrQuestion = {
	{pc:document action="lists" catid="$catid" order="listorder DESC" addfields="1"}
	{php $n = 1;}
	{loop $data $r}	
	{if $n > 1},{/if}
	{php $answer_config = json_decode($r['answer_config'], TRUE);}
	"q{$r[id]}":{
		"type":"{$answer_config[type]}",
		"title":"【{if $answer_config[type] == 'checkbox'}多选题{else}单选题{/if}】{if $answer_config[title] != ''}{$answer_config[title]}{else}{$r[title]}{/if}",
		"data":{
		{loop $answer_config[ask_list] $ask_id $ask_title}
		{if $n > 1},{/if}
			"{$ask_id}":"{$ask_title}"
		{/loop}
			}
		}
	{php $n++;}
	{/loop}	
	{/pc}
};
function hitAsk(aid) {
	var obj = eval("arrQuestion.q"+aid);
	if(obj) popup.askAdverts(aid,obj);
}

// 提交问答
function submitAsk(aid) {
	var obj = eval("arrQuestion.q"+aid);
	if (obj.type == 'checkbox') {
		var str=document.getElementsByName("answer[]");
	} else {
		var str=document.getElementsByName("answer");
	}
	var objarray=str.length;
	var answer=[];
	for (i=0;i<objarray;i++) {
		if(str[i].checked == true) {
			answer.push(str[i].value);
		}
	}
	if(answer.length){
		$.ajax({
			type:'POST',
			url:"{U('Document/Answer/answer')}",
			data:{"aid":aid,"answer":answer},
			dataType:'json',
			error:function(){
				alert('请求已经提交，请稍等~');
			},
			success:function(rst){
				if(rst.status==0){
					$('#errorMsg span.re1').html(rst.info);
					$('#errorMsg').show(500);
					setTimeout("$('#errorMsg').hide(500);",1500);
				}else{
					juxiangyou.core.func.hidePopupDiv($('#jxy_pop_ask'));
					popup._reload = true;
					popup.prompt(rst.info);
				}
			}
		});
	} else {
		$('#errorMsg span.re1').html('请选择您的答案！');
		$('#errorMsg').show(500);
		setTimeout("$('#errorMsg').hide(500);",1500);
	}
}
</script>
</body>
</html>